package com.rchat.pocmini.activity.invitefriendtogroup;

import com.aso.common.http.delegate.HttpCallbackImpl;
import com.rchat.pocmini.bean.UserNoInGroupBean;
import com.rchat.pocmini.common.mvp.BaseModel;
import com.rchat.pocmini.common.mvp.BasePresenter;
import com.rchat.pocmini.common.mvp.BaseView;

import org.json.JSONArray;

import java.util.ArrayList;

/**
 * Created by ljd on 2017/9/1.
 */

public interface InviteFriendToGroupContract {

    interface View extends BaseView {
        void queryFriendNotInGroup(ArrayList<UserNoInGroupBean.DataBean.UsersBean.UserBean> data);

        void showSelectedCount(int visible, String content);

        void showSelectedListView(int visible, ArrayList<UserNoInGroupBean.DataBean.UsersBean.UserBean> data);
    }

    abstract class Presenter extends BasePresenter<InviteFriendToGroupContract.View, InviteFriendToGroupContract.Model> {
        abstract void queryFriendNotInGroup(String userName, String groupId);

        abstract void inviteFriendToGroup(String groupId);

        abstract void clearSelected();

        abstract void searchFriend(String account);
    }

    interface Model extends BaseModel {
        /**
         * 获取不在频道内的好友列表
         *
         * @param userName
         * @param groupId
         * @param callback
         */
        void queryFriendNotInGroup(String userName, String groupId, HttpCallbackImpl callback);

        /**
         * @param groupId       群组ID
         * @param inviteFriends 邀请对象
         * @param callback
         */
        void inviteFriendToGroup(String groupId, ArrayList<UserNoInGroupBean.DataBean.UsersBean.UserBean> inviteFriends, HttpCallbackImpl callback);
    }
}
